package com.example.springbootdemo.util;

import java.util.List;

public class RestResponse {
    public static <T> RestRequest<T> err(String massage){
        return new RestRequest<T>(0,massage,null);
    }
    public static <T> RestRequest<T> success(String massage,T data){
        return new RestRequest<T>(1,massage,data);
    }
    public static <T> RestListRequest<T> other(int code, String massage, List<T> data){
        return new RestListRequest<>(code,massage,data);
    }

}
